<?php
/**
 * Created by JetBrains PhpStorm.
 * User: mazmart
 * Date: 10.11.12
 * Time: 13:49
 * To change this template use File | Settings | File Templates.
 */

include_once("Classes/LocalAlignator.php");
include("fileData/data.php");


ini_set('memory_limit', '256M');
set_time_limit(6000);


$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$starttime = $mtime;
$test =
    "ATGCGTGATAAGGCGACGGCAGCCATTGTCTTTAATCTGATATGGGCAAGCCATGCCCTAATTGCCATTGCGCATCATGCTCTGATTGACCATCT";
for ($i = 0; $i < 11; $i++) {
    $d = $data[$i];

    $a = new LocalAlignator(substr($test, 0, 200), substr($d, 0, 200));
    //$a->buildMap();

    $strings = $a->allign();
    echo "<pre>\n" . $strings['string1']."\n".$strings['compare']."\n".$strings['string2']. "</pre>\n";

}
$mtime = microtime();
$mtime = explode(" ", $mtime);
$mtime = $mtime[1] + $mtime[0];
$endtime = $mtime;
$totaltime = ($endtime - $starttime);
echo "execution time: " . $totaltime . " seconds";